home *** CD-ROM | disk | FTP | other *** search
/ Aminet 48 / Aminet 48 (2002)(GTI - Schatztruhe)[!][Apr 2002].iso / Aminet / text / edit / vim60rt.lha / Vim / vim60 / syntax / ecd.vim < prev    next >
Encoding:
Text File  |  2001-05-11  |  1.5 KB  |  57 lines

  1. " Vim syntax file
  2. " Language:    ecd (Embedix Component Description) files
  3. " Maintainer:    John Beppu <beppu@lineo.com>
  4. " URL:        http://opensource.lineo.com/~beppu/prose/ecd_vim.html
  5. " Last Change:    2001 May 10
  6.  
  7. " An ECD file contains meta-data for packages in the Embedix Linux distro.
  8. " This syntax file was derived from apachestyle.vim
  9. " by Christian Hammers <ch@westend.com>
  10.  
  11. " Quit when a syntax file was already loaded
  12. if version < 600
  13.   syntax clear
  14. elseif exists("b:current_syntax")
  15.   finish
  16. endif
  17.  
  18. syn case ignore
  19.  
  20. " specials
  21. syn match  ecdComment    "^\s*#.*"
  22.  
  23. " options and values
  24. syn match  ecdAttr    "^\s*[a-zA-Z]\S*\s*[=].*$" contains=ecdAttrN,ecdAttrV
  25. syn match  ecdAttrN    contained "^.*="me=e-1
  26. syn match  ecdAttrV    contained "=.*$"ms=s+1
  27.  
  28. " tags
  29. syn region ecdTag    start=+<+ end=+>+ contains=ecdTagN,ecdTagError
  30. syn match  ecdTagN    contained +<[/\s]*[-a-zA-Z0-9_]\++ms=s+1
  31. syn match  ecdTagError    contained "[^>]<"ms=s+1
  32.  
  33. " Define the default highlighting.
  34. " For version 5.7 and earlier: only when not done already
  35. " For version 5.8 and later: only when an item doesn't have highlighting yet
  36. if version >= 508 || !exists("did_ecd_syn_inits")
  37.   if version < 508
  38.     let did_ecd_syn_inits = 1
  39.     command -nargs=+ HiLink hi link <args>
  40.   else
  41.     command -nargs=+ HiLink hi def link <args>
  42.   endif
  43.  
  44.   HiLink ecdComment    Comment
  45.   HiLink ecdAttr    Type
  46.   HiLink ecdAttrN    Statement
  47.   HiLink ecdAttrV    Value
  48.   HiLink ecdTag        Function
  49.   HiLink ecdTagN    Statement
  50.   HiLink ecdTagError    Error
  51.  
  52.   delcommand HiLink
  53. endif
  54.  
  55. let b:current_syntax = "ecd"
  56. " vim: ts=8
  57.